import request from "../utils/request";
// 获取轮播图数据
export const reqBanner = () => request({
    url: '/mall-api/index/findBanner'
})
// 获取首页分类展示数据
export const reqCategory = () => request({
    url: '/mall-api/index/findCategory1'
})
// 猜你喜欢数据
export const reqLike = () => request({
    url: '/mall-api/index/findListGoods'
})
// 人气推荐
export const reqHot = () => request({
    url: '/mall-api/index/findRecommendGoods'
})
// 分类层级数据
export const reqSort = () => request({
    url: '/mall-api/index/findCategoryTree'
})
// 获取用户的token
export const reqToken = (code) => request({
    url: `/mall-api/weixin/wxLogin/${code}`
})
// 获取登录用户信息
export const reqUserInfo = () => request({
    url: '/mall-api/weixin/getuserInfo'
})
// 更新登录的用户信息
export const reqUpdateUserInfo = (data) => request({
    url: `/mall-api/weixin/updateUser`,
    method: 'post',
    data
})
// 获取商品分页列表
export const reqGoodsList = (page, limit, category2Id) => request({ 
    url: `/mall-api/goods/list/${page}/${limit}?category2Id=${category2Id}`,
})
// 获取商品详情
export const reqGoodsDetail = (goodsId) => request({
    url: `/mall-api/goods/${goodsId}`
})